@extends('admin.layouts.admin')
@section('header')
<style>
    .editormd-toolbar{
        position: absolute !important;
        width: 100% !important;
        left: 0px !important;
    }
    .task-list-item-checkbox{
        display: block !important;
    }
    .markdown-body li{
        display: list-item  !important;
        text-align: -webkit-match-parent  !important;
    }
    .markdown-body ol li{
        list-style-type: decimal !important;
    }
</style>
@endsection
@section('content')
    <div class="layui-form" lay-filter="LAY-add-forms" id="LAY-add" style="padding: 20px 30px 0 0;">
        <div class="layui-form-item">
            <label class="layui-form-label">用户名</label>
            <div class="layui-input-block">
                <input type="text" name="name" lay-verify="required" placeholder="用户名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input type="password" name="password" placeholder="密码" autocomplete="off" class="layui-input"  onkeyup="this.value=this.value.replace(/^\s+|\s+$/g,'')" >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">角色</label>
            <div class="layui-input-block">
                <select name="role_id"  lay-search="">
                    <option value="">直接选择或搜索选择</option>
                    @foreach($role as $value)
                        <option value="{{$value['id']}}">{{$value['display_name']}}</option>
                    @endforeach
                </select>
            </div>
        </div>

        <div class="layui-form-item layui-hide">
            <input type="button" lay-submit lay-filter="LAY-add-forms" id="LAY-add-forms" value="确认">
        </div>
    </div>

@endsection
@section('scripts')
    <script>
        layui.config({
            base: '../' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'table', 'form', 'upload'], function(){
            var $ = layui.$
                ,form = layui.form
                ,upload = layui.upload ;
            form.render('checkbox');


        });//use


    </script>
@stop
